<template>
	<view class="page">
		<view class="templates">
			<view class="tpl" v-for="t in templates" :key="t" @tap="choose(t)">{{t}}</view>
		</view>
		<textarea class="ta" v-model="text" placeholder="请输入需求或点击上方模板" />
		<view class="row">
			<button class="voice" @tap="voiceInput">语音输入</button>
			<button class="pub" @tap="publish">发布</button>
		</view>
	</view>
</template>

<script>
export default{
	data(){return{templates:['教我用微信视频通话','查询社保余额','不会缴话费'], text:''}},
	methods:{
		choose(t){ this.text=t },
		voiceInput(){ this.text='（演示）语音转文字结果' },
		publish(){ uni.showToast({ title:'已发布（演示）', icon:'none' }) }
	}
}
</script>

<style scoped>
.page{min-height:100vh;background:#fff;padding:24rpx}
.templates{display:flex;flex-wrap:wrap;gap:12rpx}
.tpl{background:#fafafa;border-radius:12rpx;height:72rpx;min-width:220rpx;display:flex;align-items:center;justify-content:center}
.ta{margin-top:16rpx;height:200rpx;background:#f7f7f7;border-radius:12rpx;padding:12rpx}
.row{display:flex;gap:12rpx;margin-top:12rpx}
.voice{flex:1;background:#ffe58f}
.pub{flex:1;background:#1677ff;color:#fff}
</style>

